import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';

export type UserPageParam = BasicPageParams & {
  name?: string;
  username?: string;
  status?: number;
  locked?: boolean;
};

export type UserUpdatedParam = {
  userId?: string;
};

export type UserAddParam = {
  roleIds?: string;
  name?: string;
  username?: string;
  password?: string;
  status?: number;
  phone?: string;
  email?: string;
  
};

export type RoleParams = {
  roleId?: String;
  name?: String;
  code?: String;
  status?: number;
  deleted?: number;
  createUser?: String;
  gmtCreated?: String;
  modifiedUser?: String;
  gmtModified?: String;
  description?: String;
};

export type RolePageParams = BasicPageParams & RoleParams;

export type PluginParams = {
  roleName?: string;
  status?: string;
};

export type PluginPageParams = BasicPageParams & PluginParams;

export type DeptParams = {
  deptName?: string;
  status?: string;
};

export type MenuParams = {
  menuName?: string;
  status?: string;
};

export type MenuAddParam = {
  menuName?: string;
  description?: string;
  component?: string;
  url?: string;
  permissions?: string;
  parentId?: string;
  type?: number;
  orderNum?: number;
  icon?: string;
  status?: number;
};

export type MenuUpdatedParam = {
  menuId?: number;
};


export interface UserListItem {
  userId?: string;
  name?: string;
  phone?: string;
  email?: string;
  username?: string;
  password?: number;
  status?: number;
  deleted?: number;
  locked?: number;
  createUser?: string;
  gmtCreated?: string;
  modifiedUser?: string;
  gmtModified?: string;
  avatar?: string;
  lastloginIp?: string;
  lastGmtLoginTime?: string;
}

export interface DeptListItem {
  id: string;
  orderNo: string;
  createTime: string;
  remark: string;
  status: number;
}

export interface MenuListItem {
  id: number;
  menuName: string;
  description: string;
  component: string;
  url: string;
  permissions: string;
  parentId: number;
  type: number;
  orderNum: number;
  status: number;
  pluginMenu: string;
  pluginId: string;
  pluginAppName: string;
  pluginAppPath: string;
  pluginRootRouting: string;  
}

export interface RoleListItem {
  id: string;
  roleName: string;
  roleValue: string;
  status: number;
  orderNo: string;
  createTime: string;
}

export type RoleAddParam = {
  name?: string;
  code?: string;
  status?: string;
  description?: string;
};

export type RoleUpdatedParam = {
  roleId?: string;
};

export interface PluginListItem {
  id: string;
  roleName: string;
  roleValue: string;
  status: number;
  orderNo: string;
  createTime: string;
}

/**
 * @description: Request list return value
 */
export type UserListGetResultModel = BasicFetchResult<UserListItem>;

export type DeptListGetResultModel = BasicFetchResult<DeptListItem>;

export type MenuListGetResultModel = BasicFetchResult<MenuListItem>;

export type RolePageListGetResultModel = BasicFetchResult<RoleListItem>;

export type PluginPageListGetResultModel = BasicFetchResult<PluginListItem>;

export type RoleListGetResultModel = RoleListItem[];
